cmake_minimum_required(VERSION 3.18)
#name
project (shared_proto)
#include compile macro
include (../head.cmake)

#include dir
include_directories(./inc)
#link dir
#link_directories()

#add source file
aux_source_directory(./src/ SRC_FILES)

#libname
add_library(${PROJECT_NAME} STATIC ${SRC_FILES})
set (INC_LIB ${CMAKE_CURRENT_SOURCE_DIR}/../lib)

add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
    COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/lib ${INC_LIB} )